MReboundParticles CoordinateList.l,NumPoints.l,DirectionList.l,DetectSize.w ; Bounce particles off edges
This command will attempt to bounce moving particles off of the edges of the
bitmap or clip window. The size of the border of detection is defined with
DetectSize.w. This is how close to the edge a pixel must be before its direction
will be reversed. Note that pixels need to be at least within the border in order
to cause this action, and care should be taken to ensure the border is wide
enough to trap even the fastest moving particles. CoordinateList.l points to a
list of X.w,Y.w pairs of coordinates and DirectionList.l points to a list of
Xmove.w,Ymove.w pairs of movement adders. If the routie detects that a pixel is
close enough to the edge of the bitmap or clip window, the corresponding Xmove
and Ymove will be negated, which brings about a reversing of direction.
converted with guide2html by Kochtopf